{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d2269470-6a29-4bd7-afdb-bc2621546385",
   "metadata": {},
   "outputs": [],
   "source": [
    "from glob import glob\n",
    "import pandas as pd\n",
    "from scipy.stats import mannwhitneyu, fisher_exact\n",
    "from statsmodels.sandbox.stats.multicomp import multipletests\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "\n",
    "sns.set_context('talk')\n",
    "sns.set(rc={\"figure.dpi\":150, 'savefig.dpi':300})\n",
    "sns.set_style('whitegrid')\n",
    "\n",
    "def p_adjust(pvalues, method='fdr_bh'):\n",
    "    res = multipletests(pvalues, method=method)\n",
    "    return np.array(res[1], dtype=float)\n",
    "\n",
    "def measure_enrichment(sig_kos, modules, all_module_kos):\n",
    "    enrichment_rows = list()\n",
    "    for module, module_kos in modules.items():\n",
    "        in_in = len(sig_kos & module_kos)  # in module and in gene set\n",
    "        in_out = len(sig_kos - module_kos)  # in gene set and out of module\n",
    "        out_in = len(module_kos - sig_kos)  # in module and out of gene set\n",
    "        out_out = len(all_module_kos - module_kos - sig_kos)\n",
    "\n",
    "        odds_ratio, p_value = fisher_exact([[in_in, in_out],\n",
    "                                            [out_in, out_out]], alternative='greater')\n",
    "        enrichment_rows.append([module, len(module_kos), in_in, in_out, out_in, out_out, odds_ratio, p_value])\n",
    "    enrichment = pd.DataFrame(enrichment_rows, columns=['module', 'module_size', 'in_in', 'in_out', 'out_in', 'out_out', 'odds_ratio', 'p_value']).set_index('module').sort_values('p_value')\n",
    "    enrichment['p_adj'] = p_adjust(enrichment['p_value'])\n",
    "    return enrichment"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7891f896-fa3c-4821-bd9c-ae78e4da9feb",
   "metadata": {},
   "source": [
    "# Correlate titers with KOs"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "19de6768-51db-4a07-882b-fb3617db5e19",
   "metadata": {},
   "source": [
    "## Read in data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "3cdd5870-2dfc-4ec4-a6fb-4db88e55d229",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SubmissionType</th>\n",
       "      <th>SampleNumber</th>\n",
       "      <th>SampleIDValidation</th>\n",
       "      <th>DiversigenCheckInSampleName</th>\n",
       "      <th>BoxLocation</th>\n",
       "      <th>SampleType</th>\n",
       "      <th>SampleSource</th>\n",
       "      <th>SequencingType</th>\n",
       "      <th>BabyN</th>\n",
       "      <th>BabyN_checked</th>\n",
       "      <th>...</th>\n",
       "      <th>median_mmNorm_PCV</th>\n",
       "      <th>median_mmNorm_DTAPHib</th>\n",
       "      <th>protectNorm_Dip</th>\n",
       "      <th>protectNorm_TET</th>\n",
       "      <th>protectNorm_PRP (Hib)</th>\n",
       "      <th>protectNorm_PT</th>\n",
       "      <th>protectNorm_PRN</th>\n",
       "      <th>protectNorm_FHA</th>\n",
       "      <th>geommean_protectNorm</th>\n",
       "      <th>VR_group_v2</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>SampleID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>106_V2</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>69</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box 8, F3</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>106</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.061955</td>\n",
       "      <td>0.052874</td>\n",
       "      <td>2.1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>1.375</td>\n",
       "      <td>1.140388</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106_V6</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>121</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box 10, C1</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>106</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.061955</td>\n",
       "      <td>0.052874</td>\n",
       "      <td>2.1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>1.375</td>\n",
       "      <td>1.140388</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106_V7</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>158</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box 11, C3</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>106</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.061955</td>\n",
       "      <td>0.052874</td>\n",
       "      <td>2.1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>1.375</td>\n",
       "      <td>1.140388</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106_S_1</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>162</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box 11, D1</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>106</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.061955</td>\n",
       "      <td>0.052874</td>\n",
       "      <td>2.1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>1.375</td>\n",
       "      <td>1.140388</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106_A1</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>188</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box 12, B3</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>106</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.061955</td>\n",
       "      <td>0.052874</td>\n",
       "      <td>2.1</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>1.375</td>\n",
       "      <td>1.140388</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 86 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           SubmissionType  SampleNumber  SampleIDValidation  \\\n",
       "SampleID                                                      \n",
       "106_V2    Primary in Tube            69                 NaN   \n",
       "106_V6    Primary in Tube           121                 NaN   \n",
       "106_V7    Primary in Tube           158                 NaN   \n",
       "106_S_1   Primary in Tube           162                 NaN   \n",
       "106_A1    Primary in Tube           188                 NaN   \n",
       "\n",
       "         DiversigenCheckInSampleName BoxLocation SampleType  SampleSource  \\\n",
       "SampleID                                                                    \n",
       "106_V2                           NaN   Box 8, F3      Stool  Human Infant   \n",
       "106_V6                           NaN  Box 10, C1      Stool  Human Infant   \n",
       "106_V7                           NaN  Box 11, C3      Stool  Human Infant   \n",
       "106_S_1                          NaN  Box 11, D1      Stool  Human Infant   \n",
       "106_A1                           NaN  Box 12, B3      Stool  Human Infant   \n",
       "\n",
       "         SequencingType  BabyN  BabyN_checked  ... median_mmNorm_PCV  \\\n",
       "SampleID                                       ...                     \n",
       "106_V2            MetaG    106            NaN  ...          0.061955   \n",
       "106_V6            MetaG    106            NaN  ...          0.061955   \n",
       "106_V7            MetaG    106            NaN  ...          0.061955   \n",
       "106_S_1           MetaG    106            NaN  ...          0.061955   \n",
       "106_A1            MetaG    106            NaN  ...          0.061955   \n",
       "\n",
       "          median_mmNorm_DTAPHib protectNorm_Dip  protectNorm_TET  \\\n",
       "SampleID                                                           \n",
       "106_V2                 0.052874             2.1              3.0   \n",
       "106_V6                 0.052874             2.1              3.0   \n",
       "106_V7                 0.052874             2.1              3.0   \n",
       "106_S_1                0.052874             2.1              3.0   \n",
       "106_A1                 0.052874             2.1              3.0   \n",
       "\n",
       "         protectNorm_PRP (Hib) protectNorm_PT  protectNorm_PRN  \\\n",
       "SampleID                                                         \n",
       "106_V2                     2.6         0.3125           0.3125   \n",
       "106_V6                     2.6         0.3125           0.3125   \n",
       "106_V7                     2.6         0.3125           0.3125   \n",
       "106_S_1                    2.6         0.3125           0.3125   \n",
       "106_A1                     2.6         0.3125           0.3125   \n",
       "\n",
       "         protectNorm_FHA  geommean_protectNorm  VR_group_v2  \n",
       "SampleID                                                     \n",
       "106_V2             1.375              1.140388          NVR  \n",
       "106_V6             1.375              1.140388          NVR  \n",
       "106_V7             1.375              1.140388          NVR  \n",
       "106_S_1            1.375              1.140388          NVR  \n",
       "106_A1             1.375              1.140388          NVR  \n",
       "\n",
       "[5 rows x 86 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "meta = pd.read_csv('../../data/metadata/stool/stool_metadata.csv', index_col='SampleID')\n",
    "meta = pd.concat([meta,\n",
    "                  pd.read_csv('../../data/metadata/stool/stool_abx_usage.csv', index_col='SampleID'),\n",
    "                  pd.read_csv('../../data/metadata/stool/stool_titers_yr1.csv', index_col='SampleID')],\n",
    "                 axis=1)\n",
    "meta = meta.query(\"`gt_2.5` == True\")\n",
    "meta['VR_group'] = meta['VR_group'].fillna('Not Measured')\n",
    "meta = meta.sort_values(['BabyN', 'age_at_collection'])\n",
    "meta = meta.loc[~pd.isna(meta['median_mmNorm'])]\n",
    "meta.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "79209a23-aaf8-4bdb-95d8-b7ba74e40ae1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(11048, 529)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>106_V2</th>\n",
       "      <th>106_V6</th>\n",
       "      <th>106_V7</th>\n",
       "      <th>106_S_1</th>\n",
       "      <th>106_A1</th>\n",
       "      <th>107_V2</th>\n",
       "      <th>107_V3</th>\n",
       "      <th>107_V6</th>\n",
       "      <th>107_S1</th>\n",
       "      <th>107_V7</th>\n",
       "      <th>...</th>\n",
       "      <th>264_S2F</th>\n",
       "      <th>264_V9</th>\n",
       "      <th>264_V10</th>\n",
       "      <th>264_V11</th>\n",
       "      <th>264_V12</th>\n",
       "      <th>265_V2</th>\n",
       "      <th>265_V5</th>\n",
       "      <th>265_V6</th>\n",
       "      <th>265_V8</th>\n",
       "      <th>265_S1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>K00001</th>\n",
       "      <td>0.000107</td>\n",
       "      <td>0.000230</td>\n",
       "      <td>0.000334</td>\n",
       "      <td>0.000185</td>\n",
       "      <td>0.000906</td>\n",
       "      <td>4.820137e-04</td>\n",
       "      <td>0.000200</td>\n",
       "      <td>0.000760</td>\n",
       "      <td>0.000746</td>\n",
       "      <td>7.461465e-04</td>\n",
       "      <td>...</td>\n",
       "      <td>7.914440e-04</td>\n",
       "      <td>3.764422e-04</td>\n",
       "      <td>0.000187</td>\n",
       "      <td>1.659096e-04</td>\n",
       "      <td>0.000143</td>\n",
       "      <td>0.000019</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>6.134967e-04</td>\n",
       "      <td>0.000217</td>\n",
       "      <td>3.267179e-04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K00002</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000003</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>0.000001</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>9.658854e-07</td>\n",
       "      <td>...</td>\n",
       "      <td>2.815525e-07</td>\n",
       "      <td>6.831982e-07</td>\n",
       "      <td>0.000016</td>\n",
       "      <td>1.020476e-05</td>\n",
       "      <td>0.000007</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>2.978285e-07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K00003</th>\n",
       "      <td>0.000066</td>\n",
       "      <td>0.000667</td>\n",
       "      <td>0.000209</td>\n",
       "      <td>0.000128</td>\n",
       "      <td>0.001472</td>\n",
       "      <td>9.958655e-05</td>\n",
       "      <td>0.000074</td>\n",
       "      <td>0.001010</td>\n",
       "      <td>0.001160</td>\n",
       "      <td>7.393853e-04</td>\n",
       "      <td>...</td>\n",
       "      <td>9.913462e-04</td>\n",
       "      <td>5.342610e-04</td>\n",
       "      <td>0.000521</td>\n",
       "      <td>6.297325e-04</td>\n",
       "      <td>0.000501</td>\n",
       "      <td>0.000054</td>\n",
       "      <td>0.000043</td>\n",
       "      <td>5.555358e-06</td>\n",
       "      <td>0.000397</td>\n",
       "      <td>6.165050e-04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K00004</th>\n",
       "      <td>0.000036</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>7.404204e-07</td>\n",
       "      <td>0.000004</td>\n",
       "      <td>0.000004</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>7.727083e-06</td>\n",
       "      <td>...</td>\n",
       "      <td>4.645616e-06</td>\n",
       "      <td>3.415991e-07</td>\n",
       "      <td>0.000002</td>\n",
       "      <td>3.291858e-07</td>\n",
       "      <td>0.000006</td>\n",
       "      <td>0.000003</td>\n",
       "      <td>0.000049</td>\n",
       "      <td>3.703572e-07</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.680457e-06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K00005</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000537</td>\n",
       "      <td>0.000064</td>\n",
       "      <td>0.000041</td>\n",
       "      <td>0.000021</td>\n",
       "      <td>1.096563e-03</td>\n",
       "      <td>0.000402</td>\n",
       "      <td>0.000136</td>\n",
       "      <td>0.000145</td>\n",
       "      <td>3.037710e-04</td>\n",
       "      <td>...</td>\n",
       "      <td>1.144511e-04</td>\n",
       "      <td>7.890940e-05</td>\n",
       "      <td>0.000201</td>\n",
       "      <td>2.011325e-04</td>\n",
       "      <td>0.000209</td>\n",
       "      <td>0.000390</td>\n",
       "      <td>0.000398</td>\n",
       "      <td>9.525587e-04</td>\n",
       "      <td>0.000120</td>\n",
       "      <td>3.154004e-04</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 529 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          106_V2    106_V6    106_V7   106_S_1    106_A1        107_V2  \\\n",
       "K00001  0.000107  0.000230  0.000334  0.000185  0.000906  4.820137e-04   \n",
       "K00002  0.000000  0.000000  0.000003  0.000002  0.000001  0.000000e+00   \n",
       "K00003  0.000066  0.000667  0.000209  0.000128  0.001472  9.958655e-05   \n",
       "K00004  0.000036  0.000002  0.000000  0.000000  0.000000  7.404204e-07   \n",
       "K00005  0.000020  0.000537  0.000064  0.000041  0.000021  1.096563e-03   \n",
       "\n",
       "          107_V3    107_V6    107_S1        107_V7  ...       264_S2F  \\\n",
       "K00001  0.000200  0.000760  0.000746  7.461465e-04  ...  7.914440e-04   \n",
       "K00002  0.000000  0.000000  0.000002  9.658854e-07  ...  2.815525e-07   \n",
       "K00003  0.000074  0.001010  0.001160  7.393853e-04  ...  9.913462e-04   \n",
       "K00004  0.000004  0.000004  0.000000  7.727083e-06  ...  4.645616e-06   \n",
       "K00005  0.000402  0.000136  0.000145  3.037710e-04  ...  1.144511e-04   \n",
       "\n",
       "              264_V9   264_V10       264_V11   264_V12    265_V2    265_V5  \\\n",
       "K00001  3.764422e-04  0.000187  1.659096e-04  0.000143  0.000019  0.000002   \n",
       "K00002  6.831982e-07  0.000016  1.020476e-05  0.000007  0.000000  0.000000   \n",
       "K00003  5.342610e-04  0.000521  6.297325e-04  0.000501  0.000054  0.000043   \n",
       "K00004  3.415991e-07  0.000002  3.291858e-07  0.000006  0.000003  0.000049   \n",
       "K00005  7.890940e-05  0.000201  2.011325e-04  0.000209  0.000390  0.000398   \n",
       "\n",
       "              265_V6    265_V8        265_S1  \n",
       "K00001  6.134967e-04  0.000217  3.267179e-04  \n",
       "K00002  0.000000e+00  0.000002  2.978285e-07  \n",
       "K00003  5.555358e-06  0.000397  6.165050e-04  \n",
       "K00004  3.703572e-07  0.000000  2.680457e-06  \n",
       "K00005  9.525587e-04  0.000120  3.154004e-04  \n",
       "\n",
       "[5 rows x 529 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "ko_abunds = pd.read_csv('../../data/stool/ko_abundance_table.rel.tsv', sep='\\t', index_col=0)\n",
    "ko_abunds.index = [i.replace(\"'\", \"_\").replace('#', '_') for i in ko_abunds.index]\n",
    "ko_abunds.columns = [i.split('.txt')[0] for i in ko_abunds.columns]\n",
    "ko_abunds = ko_abunds[meta.index]\n",
    "print(ko_abunds.shape)\n",
    "display(ko_abunds.head())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2ec211de-fa3f-472d-a373-f754c745562c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(529, 86)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/var/folders/6t/1w2t3qmd1rx81mfw9sq_tfpr0000gn/T/ipykernel_12874/2340599432.py:2: FutureWarning: Passing a set as an indexer is deprecated and will raise in a future version. Use a list instead.\n",
      "  meta_matched = meta.loc[in_both]\n"
     ]
    }
   ],
   "source": [
    "in_both = set(meta.index) & set(ko_abunds.columns)\n",
    "meta_matched = meta.loc[in_both]\n",
    "print(meta_matched.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "e7300a20-03ca-4941-9ed6-7e1b851f97e3",
   "metadata": {},
   "outputs": [],
   "source": [
    "meta_v5 = meta_matched.query(\"VisitCode == 'V5'\")\n",
    "meta_v6 = meta_matched.query(\"VisitCode == 'V6'\")\n",
    "meta_v7 = meta_matched.query(\"VisitCode == 'V7'\")\n",
    "meta_v9 = meta_matched.query(\"VisitCode == 'V9'\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "f6a413ed-371e-4d1e-8ade-071dc4e10cf8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SubmissionType</th>\n",
       "      <th>SampleNumber</th>\n",
       "      <th>SampleIDValidation</th>\n",
       "      <th>DiversigenCheckInSampleName</th>\n",
       "      <th>BoxLocation</th>\n",
       "      <th>SampleType</th>\n",
       "      <th>SampleSource</th>\n",
       "      <th>SequencingType</th>\n",
       "      <th>BabyN</th>\n",
       "      <th>BabyN_checked</th>\n",
       "      <th>...</th>\n",
       "      <th>median_mmNorm_PCV</th>\n",
       "      <th>median_mmNorm_DTAPHib</th>\n",
       "      <th>protectNorm_Dip</th>\n",
       "      <th>protectNorm_TET</th>\n",
       "      <th>protectNorm_PRP (Hib)</th>\n",
       "      <th>protectNorm_PT</th>\n",
       "      <th>protectNorm_PRN</th>\n",
       "      <th>protectNorm_FHA</th>\n",
       "      <th>geommean_protectNorm</th>\n",
       "      <th>VR_group_v2</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>SampleID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>123_V8</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>404</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box8</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>123</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.044249</td>\n",
       "      <td>0.037475</td>\n",
       "      <td>3.2</td>\n",
       "      <td>2.1</td>\n",
       "      <td>2.266667</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.068422</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>205_V9</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>215</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box 12, F6</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>205</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.083058</td>\n",
       "      <td>0.094258</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.6</td>\n",
       "      <td>6.800000</td>\n",
       "      <td>0.6250</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>0.750</td>\n",
       "      <td>1.407340</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>212_S1</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>122</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box 10, C2</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>212</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.105686</td>\n",
       "      <td>0.229474</td>\n",
       "      <td>1.2</td>\n",
       "      <td>7.2</td>\n",
       "      <td>20.133333</td>\n",
       "      <td>1.1250</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>1.875</td>\n",
       "      <td>2.204138</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>130_V10</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>626</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box19</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>130</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.084558</td>\n",
       "      <td>0.039926</td>\n",
       "      <td>0.5</td>\n",
       "      <td>2.7</td>\n",
       "      <td>1.400000</td>\n",
       "      <td>0.6250</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>3.125</td>\n",
       "      <td>1.024095</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>123_V11</th>\n",
       "      <td>Primary in Tube</td>\n",
       "      <td>624</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Box19</td>\n",
       "      <td>Stool</td>\n",
       "      <td>Human Infant</td>\n",
       "      <td>MetaG</td>\n",
       "      <td>123</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>0.044249</td>\n",
       "      <td>0.037475</td>\n",
       "      <td>3.2</td>\n",
       "      <td>2.1</td>\n",
       "      <td>2.266667</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>0.3125</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.068422</td>\n",
       "      <td>NVR</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 86 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           SubmissionType  SampleNumber  SampleIDValidation  \\\n",
       "SampleID                                                      \n",
       "123_V8    Primary in Tube           404                 NaN   \n",
       "205_V9    Primary in Tube           215                 NaN   \n",
       "212_S1    Primary in Tube           122                 NaN   \n",
       "130_V10   Primary in Tube           626                 NaN   \n",
       "123_V11   Primary in Tube           624                 NaN   \n",
       "\n",
       "         DiversigenCheckInSampleName BoxLocation SampleType  SampleSource  \\\n",
       "SampleID                                                                    \n",
       "123_V8                           NaN        Box8      Stool  Human Infant   \n",
       "205_V9                           NaN  Box 12, F6      Stool  Human Infant   \n",
       "212_S1                           NaN  Box 10, C2      Stool  Human Infant   \n",
       "130_V10                          NaN       Box19      Stool  Human Infant   \n",
       "123_V11                          NaN       Box19      Stool  Human Infant   \n",
       "\n",
       "         SequencingType  BabyN  BabyN_checked  ... median_mmNorm_PCV  \\\n",
       "SampleID                                       ...                     \n",
       "123_V8            MetaG    123            NaN  ...          0.044249   \n",
       "205_V9            MetaG    205            NaN  ...          0.083058   \n",
       "212_S1            MetaG    212            NaN  ...          0.105686   \n",
       "130_V10           MetaG    130            NaN  ...          0.084558   \n",
       "123_V11           MetaG    123            NaN  ...          0.044249   \n",
       "\n",
       "          median_mmNorm_DTAPHib protectNorm_Dip  protectNorm_TET  \\\n",
       "SampleID                                                           \n",
       "123_V8                 0.037475             3.2              2.1   \n",
       "205_V9                 0.094258             3.0              2.6   \n",
       "212_S1                 0.229474             1.2              7.2   \n",
       "130_V10                0.039926             0.5              2.7   \n",
       "123_V11                0.037475             3.2              2.1   \n",
       "\n",
       "         protectNorm_PRP (Hib) protectNorm_PT  protectNorm_PRN  \\\n",
       "SampleID                                                         \n",
       "123_V8                2.266667         0.3125           0.3125   \n",
       "205_V9                6.800000         0.6250           0.3125   \n",
       "212_S1               20.133333         1.1250           0.3125   \n",
       "130_V10               1.400000         0.6250           0.3125   \n",
       "123_V11               2.266667         0.3125           0.3125   \n",
       "\n",
       "         protectNorm_FHA  geommean_protectNorm  VR_group_v2  \n",
       "SampleID                                                     \n",
       "123_V8             1.000              1.068422          NVR  \n",
       "205_V9             0.750              1.407340          NVR  \n",
       "212_S1             1.875              2.204138          NVR  \n",
       "130_V10            3.125              1.024095          NVR  \n",
       "123_V11            1.000              1.068422          NVR  \n",
       "\n",
       "[5 rows x 86 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "meta_PCV = meta_matched.loc[~pd.isna(meta_matched['median_mmNorm_PCV'])]\n",
    "meta_PCV.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "033d15a4-e7ca-4335-b6fc-116de0d44bf2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2208\n"
     ]
    }
   ],
   "source": [
    "# The KEGG module file is not in the git repo, future users will need to find a copy of this file somewhere\n",
    "modules = {line.strip().split()[0]: set(line.strip().split()[1:]) for line in open('../../../../KEGG.20210320/module_kos.tsv')}\n",
    "modules = {key: value for key, value in modules.items() if len(value) >= 5}\n",
    "all_module_kos = {ko for module, kos in modules.items() for ko in kos}\n",
    "print(len(all_module_kos))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5d2b8c1a-899e-4d80-b1fb-d2c541b9f796",
   "metadata": {},
   "source": [
    "## KO correlations\n",
    "\n",
    "### 2 months"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "ac47252b-b54b-4ac0-b35e-de65db353143",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(4416, 43)\n"
     ]
    }
   ],
   "source": [
    "ko_abunds_v5 = ko_abunds[meta_v5.index]\n",
    "ko_abunds_v5 = ko_abunds_v5.loc[(ko_abunds_v5 > 0).sum(axis=1) > ko_abunds_v5.shape[1]*.2]\n",
    "ko_abunds_v5 = ko_abunds_v5.loc[ko_abunds_v5.var(axis=1) > 1e-10] # variance filter\n",
    "print(ko_abunds_v5.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "63d0a8cb-7821-4e6d-bc4b-494c675081f5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LVR_mean</th>\n",
       "      <th>NVR_mean</th>\n",
       "      <th>statistic</th>\n",
       "      <th>p_value</th>\n",
       "      <th>p_adj</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ko</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>K01714</th>\n",
       "      <td>0.000971</td>\n",
       "      <td>0.000706</td>\n",
       "      <td>206.0</td>\n",
       "      <td>0.006752</td>\n",
       "      <td>0.99327</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K15975</th>\n",
       "      <td>0.000011</td>\n",
       "      <td>0.000005</td>\n",
       "      <td>202.0</td>\n",
       "      <td>0.011149</td>\n",
       "      <td>0.99327</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K20459</th>\n",
       "      <td>0.000110</td>\n",
       "      <td>0.000046</td>\n",
       "      <td>201.0</td>\n",
       "      <td>0.013652</td>\n",
       "      <td>0.99327</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K20460</th>\n",
       "      <td>0.000072</td>\n",
       "      <td>0.000036</td>\n",
       "      <td>199.0</td>\n",
       "      <td>0.015898</td>\n",
       "      <td>0.99327</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K06403</th>\n",
       "      <td>0.000022</td>\n",
       "      <td>0.000001</td>\n",
       "      <td>182.5</td>\n",
       "      <td>0.016287</td>\n",
       "      <td>0.99327</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        LVR_mean  NVR_mean  statistic   p_value    p_adj\n",
       "ko                                                      \n",
       "K01714  0.000971  0.000706      206.0  0.006752  0.99327\n",
       "K15975  0.000011  0.000005      202.0  0.011149  0.99327\n",
       "K20459  0.000110  0.000046      201.0  0.013652  0.99327\n",
       "K20460  0.000072  0.000036      199.0  0.015898  0.99327\n",
       "K06403  0.000022  0.000001      182.5  0.016287  0.99327"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ko_stats_v5_rows = list()\n",
    "for ko, row in ko_abunds_v5.iterrows():\n",
    "    lvr_abunds = row[meta_v5.query('VR_group == \"LVR\"').index]\n",
    "    nvr_abunds = row[meta_v5.query('VR_group == \"NVR\"').index]\n",
    "    # check for not all zeros\n",
    "    lvr_gt_20 = (lvr_abunds != 0).sum()/len(lvr_abunds) > .2\n",
    "    nvr_gt_20 = (nvr_abunds != 0).sum()/len(nvr_abunds) > .2\n",
    "    # lvr_gt_20 = lvr_abunds.sum()/len(lvr_abunds) > 5\n",
    "    # nvr_gt_20 = nvr_abunds.sum()/len(nvr_abunds) > 5\n",
    "    # print(lvr_gt_20, nvr_gt_20)\n",
    "    if lvr_gt_20 or nvr_gt_20:\n",
    "        stat, p_value = mannwhitneyu(lvr_abunds, nvr_abunds)\n",
    "        ko_stats_v5_rows.append([ko, lvr_abunds.mean(), nvr_abunds.mean(), stat, p_value])\n",
    "ko_stats_v5 = pd.DataFrame(ko_stats_v5_rows, columns=['ko', 'LVR_mean', 'NVR_mean', 'statistic', 'p_value']).sort_values('p_value')\n",
    "ko_stats_v5['p_adj'] = p_adjust(ko_stats_v5['p_value'])\n",
    "ko_stats_v5 = ko_stats_v5.set_index('ko')\n",
    "ko_stats_v5.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "2ba1731b-0594-4532-ac19-175deeaaaecc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA18AAAJwCAYAAAB2y9s+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/NK7nSAAAACXBIWXMAABcSAAAXEgFnn9JSAABaoklEQVR4nO3dfVjUdaL//xdOowyg6w0riLC5eZf1VdQ9Ba4ooGFrW3uUOJvblopcRywtb3It07N6uavWcY+7lJi3R5M8uWltu+S2SgqkppBbKnYUlHSzVm60BsUBG4f5/eGZ+UmAzDjwQeX5uK699Pq8bz8sTrx4v9+fj5/T6XQKAAAAANCs2rT0BAAAAACgNSB8AQAAAIABCF8AAAAAYADCFwAAAAAYgPAFAAAAAAYgfAEAAACAAQhfAAAAAGAAwhcAAAAAGIDwBQAAAAAGIHwBAAAAgAEIXwAAAABgAMIXAAAAABiA8AUAAAAABrijpSeA6ysoKJDdblebNm3Url27lp4OAAAA0KpdvnxZNTU1MpvN6t+/v1dtCV83ObvdLqfTKYfDIZvN1tLTAQAAAKCrP6d7i/B1k2vTpo0cDof8/PxksVhaejpAk3M6naqqqpIkWSwW+fn5tfCMAAA3gs9ztBZVVVVyOp1q08b7E1yEr5tcu3btZLPZZLFY1K9fv5aeDtDkHA6HDh06JEnq27evTCZTy04IAHBD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uijjwwfOywszLCxhg4dqj179hDAcEvwOXyVlZVJUoNnnbp27VqrXlP2VVFRoerqaq/aNDaGq825c+dUVlamnj17SpIWL16sadOm6dChQ/rlL39Zq/6TTz6pmTNn1lmta0pOp7PW1kngdnHt9zXf4wDQdC5dutQiwcto+/bt08WLFxUYGNjSU0Er4XQ6b7itz+HLtZTt7+9fb7nruidL3q46FovFo75cf7Zt27bB4PPdNq4l8YbmK0nt2rWrM+dOnTpp7NixOnXqlL73ve+pd+/eOnv2rI4dO6bMzEzde++9Gjt2bKP3eKOqqqp06NChZusfuBkUFBS09BQA4LZRVVXl/vvOnTsb/PmqKbl+KDViFaqqqsp97OTIkSOG3B/gK5/Dl8lkUk1NTaP/yDxJiN89X9VYX67A5ck/cFcbT8e4to3D4VBqaqr27t2rOXPmaNKkSe72+/fv17PPPqu5c+eqffv2euCBBxrtFwAAwEgWi4VwAtwEfA5fgYGBslqttX67ci3XtkBP/sG7los97ctV//Lly6qpqal39auhNq7r9bl8+bIkuV8O/ac//Ul79+7VyJEjaz2yXpKGDBmiOXPmaP78+UpPT2+28GWxWBo8VwfcyhwOh3vFq3///oYd0AaA2921D8AYMGBAs2/LM/rz3Oj7A1wKCwsbzCuN8Tl8de3aVVarVeXl5YqIiKhT7jpj5Tp71Vhfn332mcrLy+st/25fQUFBCgoKUmVlpcrLy+s9x/XdNq46DY1RX5v9+/dLkoYNG1Zv/djYWElX/4+w2+0ym83Xucsb4+fnxw+luO2ZTCa+zwGgiVz7eWr056sR47Xk/aF182Vbrc9PiHCtxlz77q1rua57smpzI325nnLoaZtevXrJZDLpq6++qjexfv311zp//rzatWunO++8U9LVFzZL0h131J9VXdcdDodqamoavkEAAAAArZbP4cu16rNjx446Zd98843y8vJkNps1dOhQj/vKysqqE2Lsdrt27dolSYqPj/do/OLiYhUVFalz586KjIyUdPVhGtHR0bLb7e53hF1rx44d7kezulawXE88dI3/XXv27HHXcz2sAwAAAACu5XP4SkhIUFhYmPbu3avNmze7r1dXV2vevH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HA4tGjRIm3ZskULFizQ6tWr3fUrKio0e/ZsSdLatWsVExMjSbJarZo8ebL27dunTZs2KSUlxd1m//79Wrdunbp166bNmzere/fukqTjx49r4sSJSk9PV2xsrAYMGCBJunjxoubOnSu73a45c+Zo0qRJ8vPzkyQdPnxYKSkp2rp1q3784x/roYce8uXLCQAAAOA25fPK1/bt23XmzBkNGTLEHbwkyd/fX0uWLFFAQIDeeustVVRUNNrXwYMHdfDgQfXo0UPTpk1zXzeZTJo/f77CwsKUk5OjkydPuss2b96syspKjRkzxh28JKljx45aunSpJGnDhg1yOBzuMld4mzlzpjt4SdLdd9+tGTNmyOl0av369e7rWVlZslqtuv/++5WSkuIOXpIUGRmpKVOmSJL+8pe/NP4FAwAAANAq+Ry+du/eLUlKSEioU9apUydFRUXJbrdrz549Hvc1cuRItWlTe2pms1kjRoyQJO3atatOm/rOafXs2VN9+vRReXm5jhw5IkmqrKxUfn6+TCaTRo4cWafNqFGj5Ofnp5ycHHdgs9vtuvfeexUXF1fvvO+66y5JUllZWaP3CAAAAKB18jl8FRUVSZL69u1bb3mvXr0kXd3S52lfffr08bivEydOeNWmuLhYDodDYWFhCgoKqlO/c+fO6tKli6qrq3X69GlJ0mOPPaZ33nmn1tbFax0+fFiSFBoaet37AwAAANB6+Xzmy7XaExISUm95165da9Vryr4qKipUXV3tVZvGxnC1OXfunMrKytSzZ8/rzrm0tFQZGRmS1KznvZxOZ62tk8Dt4trva77HAeDWxec5Wgun03nDbX0OXzabTdLVM171cV131fOkL4vF4lFfrj/btm1bZ5tiQ20uXbp03flKUrt27Tya88WLF/X000/r0qVLuu+++/TTn/70uvV9UVVVpUOHDjVb/8DNoKCgoKWnAABoAnyeA/XzeduhyWSSpFoPoaiPJwnR275cgaux+te28XSMa9vU5/z585owYYKOHj2q8PBw/eEPf/CoTwAAAACtk88rX4GBgbJaraqqqqq33LUtsKHVrO/2Jcnjvlz1L1++rJqamnpXvxpq47pen8uXL0tSgy+HLioq0lNPPaUvv/xSP/z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AAA3LDq6mpNnTpVe/fulcVi0UsvvaSf/OQnLT0t4KZE+AIAAMANcTgc7uDVpUsXrVq1SgMGDGjpaQE3LcIXAAAAbshrr72mvXv3KiAgQK+//rp69+7d0lMCbmqELwAAAHitoqJC69evlyR17dpVq1evbrDuI488otjYWKOmBty0CF8AAADwWn5+vmw2myTp9OnTOn36dIN1+/XrR/gCJPk5nU5nS08CAAAAAG53vOcLAAAAAAxA+AIAAAAAAxC+AAAAAMAAhC8AAAAAMADhCwAAAAAMQPgCAAAAAAMQvgAAAADAAIQvAAAAADAA4QsAAAAADED4AgAAAAADEL4AAAAAwACELwAAAAAwAOELAAAAAAxA+AIAAAAAAxC+AAAAAMAAhC8AAAAAMADhCwAAAAAMQPgCAAAAAAP8f/GvB31EsG75AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 960x720 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "ko = \"K01714\"\n",
    "lvr_abunds = ko_abunds_v5.loc[ko, meta_v5.query('VR_group == \"LVR\"').index]\n",
    "nvr_abunds = ko_abunds_v5.loc[ko, meta_v5.query('VR_group == \"NVR\"').index]\n",
    "_ = plt.boxplot([lvr_abunds, nvr_abunds])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "9200aaa3-4f03-4d6a-81da-8a781289659a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "32\n"
     ]
    }
   ],
   "source": [
    "print(len(ko_stats_v5.query('p_value < .05')))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "07dcdd8a-a37e-4c4f-94fe-bb58c26e2e53",
   "metadata": {},
   "source": [
    "When we do these correlations we get no significant after FDR correction. There is strong significance in the raw p-values though with 278 unadjusted p-values < .05. To take advantage of this result we will run a module enrichment test to look for enrichment of KEGG modules."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "1bf5e139-b5fd-4012-a608-14dbc77eb5cd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>module_size</th>\n",
       "      <th>in_in</th>\n",
       "      <th>in_out</th>\n",
       "      <th>out_in</th>\n",
       "      <th>out_out</th>\n",
       "      <th>odds_ratio</th>\n",
       "      <th>p_value</th>\n",
       "      <th>p_adj</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>module</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>M00020</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>31</td>\n",
       "      <td>4</td>\n",
       "      <td>2200</td>\n",
       "      <td>17.741935</td>\n",
       "      <td>0.069598</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00309</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>31</td>\n",
       "      <td>7</td>\n",
       "      <td>2197</td>\n",
       "      <td>10.124424</td>\n",
       "      <td>0.109079</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00526</th>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>31</td>\n",
       "      <td>8</td>\n",
       "      <td>2196</td>\n",
       "      <td>8.854839</td>\n",
       "      <td>0.121875</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00525</th>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>31</td>\n",
       "      <td>8</td>\n",
       "      <td>2196</td>\n",
       "      <td>8.854839</td>\n",
       "      <td>0.121875</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00527</th>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>31</td>\n",
       "      <td>9</td>\n",
       "      <td>2195</td>\n",
       "      <td>7.867384</td>\n",
       "      <td>0.134493</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        module_size  in_in  in_out  out_in  out_out  odds_ratio   p_value  \\\n",
       "module                                                                      \n",
       "M00020            5      1      31       4     2200   17.741935  0.069598   \n",
       "M00309            8      1      31       7     2197   10.124424  0.109079   \n",
       "M00526            9      1      31       8     2196    8.854839  0.121875   \n",
       "M00525            9      1      31       8     2196    8.854839  0.121875   \n",
       "M00527           10      1      31       9     2195    7.867384  0.134493   \n",
       "\n",
       "        p_adj  \n",
       "module         \n",
       "M00020    1.0  \n",
       "M00309    1.0  \n",
       "M00526    1.0  \n",
       "M00525    1.0  \n",
       "M00527    1.0  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "v5_sig_kos = set(ko_stats_v5.query('p_value < .05').index)\n",
    "v5_enrichment = measure_enrichment(v5_sig_kos, modules, all_module_kos)\n",
    "# v5_enrichment.to_csv('../../../data/stool_metag/ko_correlation_enrichment_V5.tsv', sep='\\t')\n",
    "v5_enrichment.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b0608220-b032-4551-a312-4c30bd729226",
   "metadata": {},
   "source": [
    "### 4 months"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "2c46b104-5035-42ea-9c7a-a14cad62805c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(4386, 45)\n"
     ]
    }
   ],
   "source": [
    "ko_abunds_v6 = ko_abunds[meta_v6.index]\n",
    "ko_abunds_v6 = ko_abunds_v6.loc[(ko_abunds_v6 > 0).sum(axis=1) > ko_abunds_v6.shape[1]*.2]\n",
    "ko_abunds_v6 = ko_abunds_v6.loc[ko_abunds_v6.var(axis=1) > 1e-10] # variance filter\n",
    "print(ko_abunds_v6.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "0f6db620-22e5-499e-98e2-86bd62f37a1a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LVR_mean</th>\n",
       "      <th>NVR_mean</th>\n",
       "      <th>statistic</th>\n",
       "      <th>p_value</th>\n",
       "      <th>p_adj</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ko</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>K17243</th>\n",
       "      <td>0.000021</td>\n",
       "      <td>0.000001</td>\n",
       "      <td>303.0</td>\n",
       "      <td>0.000569</td>\n",
       "      <td>0.779967</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K00094</th>\n",
       "      <td>0.000028</td>\n",
       "      <td>0.000096</td>\n",
       "      <td>82.5</td>\n",
       "      <td>0.003151</td>\n",
       "      <td>0.779967</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K02436</th>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.000058</td>\n",
       "      <td>87.5</td>\n",
       "      <td>0.004752</td>\n",
       "      <td>0.779967</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K07334</th>\n",
       "      <td>0.000009</td>\n",
       "      <td>0.000032</td>\n",
       "      <td>89.0</td>\n",
       "      <td>0.005272</td>\n",
       "      <td>0.779967</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K07075</th>\n",
       "      <td>0.000074</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>304.0</td>\n",
       "      <td>0.006737</td>\n",
       "      <td>0.779967</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        LVR_mean  NVR_mean  statistic   p_value     p_adj\n",
       "ko                                                       \n",
       "K17243  0.000021  0.000001      303.0  0.000569  0.779967\n",
       "K00094  0.000028  0.000096       82.5  0.003151  0.779967\n",
       "K02436  0.000020  0.000058       87.5  0.004752  0.779967\n",
       "K07334  0.000009  0.000032       89.0  0.005272  0.779967\n",
       "K07075  0.000074  0.000031      304.0  0.006737  0.779967"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ko_stats_v6_rows = list()\n",
    "for ko, row in ko_abunds_v6.iterrows():\n",
    "    lvr_abunds = row[meta_v6.query('VR_group == \"LVR\"').index]\n",
    "    nvr_abunds = row[meta_v6.query('VR_group == \"NVR\"').index]\n",
    "    # check for not all zeros\n",
    "    lvr_gt_20 = (lvr_abunds != 0).sum()/len(lvr_abunds) > .2\n",
    "    nvr_gt_20 = (nvr_abunds != 0).sum()/len(nvr_abunds) > .2\n",
    "    # lvr_gt_20 = lvr_abunds.sum()/len(lvr_abunds) > 5\n",
    "    # nvr_gt_20 = nvr_abunds.sum()/len(nvr_abunds) > 5\n",
    "    # print(lvr_gt_20, nvr_gt_20)\n",
    "    if lvr_gt_20 or nvr_gt_20:\n",
    "        stat, p_value = mannwhitneyu(lvr_abunds, nvr_abunds)\n",
    "        ko_stats_v6_rows.append([ko, lvr_abunds.mean(), nvr_abunds.mean(), stat, p_value])\n",
    "ko_stats_v6 = pd.DataFrame(ko_stats_v6_rows, columns=['ko', 'LVR_mean', 'NVR_mean', 'statistic', 'p_value']).sort_values('p_value')\n",
    "ko_stats_v6 = ko_stats_v6.set_index('ko')\n",
    "ko_stats_v6['p_adj'] = p_adjust(ko_stats_v6['p_value'])\n",
    "ko_stats_v6.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "6e9a9b8f-7609-41ef-bad4-1e55d42dec59",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "201\n"
     ]
    }
   ],
   "source": [
    "print(len(ko_stats_v6.query('p_value < .05')))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "276a4a87-ccbf-421a-a190-4983deedd88e",
   "metadata": {},
   "source": [
    "Many fewer significant results than at 2 months but we will still look for enrichment."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "bdae7e95-7a23-4196-98d5-a5fab527253e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>module_size</th>\n",
       "      <th>in_in</th>\n",
       "      <th>in_out</th>\n",
       "      <th>out_in</th>\n",
       "      <th>out_out</th>\n",
       "      <th>odds_ratio</th>\n",
       "      <th>p_value</th>\n",
       "      <th>p_adj</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>module</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>M00911</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>199</td>\n",
       "      <td>6</td>\n",
       "      <td>2188</td>\n",
       "      <td>3.664992</td>\n",
       "      <td>0.140302</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00525</th>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>199</td>\n",
       "      <td>7</td>\n",
       "      <td>2187</td>\n",
       "      <td>3.139986</td>\n",
       "      <td>0.170823</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00527</th>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>199</td>\n",
       "      <td>8</td>\n",
       "      <td>2186</td>\n",
       "      <td>2.746231</td>\n",
       "      <td>0.202296</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00016</th>\n",
       "      <td>13</td>\n",
       "      <td>2</td>\n",
       "      <td>199</td>\n",
       "      <td>11</td>\n",
       "      <td>2183</td>\n",
       "      <td>1.994518</td>\n",
       "      <td>0.298968</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00575</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>200</td>\n",
       "      <td>4</td>\n",
       "      <td>2190</td>\n",
       "      <td>2.737500</td>\n",
       "      <td>0.355105</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        module_size  in_in  in_out  out_in  out_out  odds_ratio   p_value  \\\n",
       "module                                                                      \n",
       "M00911            8      2     199       6     2188    3.664992  0.140302   \n",
       "M00525            9      2     199       7     2187    3.139986  0.170823   \n",
       "M00527           10      2     199       8     2186    2.746231  0.202296   \n",
       "M00016           13      2     199      11     2183    1.994518  0.298968   \n",
       "M00575            5      1     200       4     2190    2.737500  0.355105   \n",
       "\n",
       "        p_adj  \n",
       "module         \n",
       "M00911    1.0  \n",
       "M00525    1.0  \n",
       "M00527    1.0  \n",
       "M00016    1.0  \n",
       "M00575    1.0  "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "v6_sig_kos = set(ko_stats_v6.query('p_value < .05').index)\n",
    "v6_enrichment = measure_enrichment(v6_sig_kos, modules, all_module_kos)\n",
    "v6_enrichment.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "883f352a-6042-4e6d-8659-e77b1fe63757",
   "metadata": {},
   "source": [
    "We find nothing though."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "66a0950e-aa69-4e2d-b69c-766d160f52ab",
   "metadata": {},
   "source": [
    "### 6 months"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "b305de69-3eb5-4aa6-b67e-bf98d8be74a1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(4330, 50)\n"
     ]
    }
   ],
   "source": [
    "ko_abunds_v7 = ko_abunds[meta_v7.index]\n",
    "ko_abunds_v7 = ko_abunds_v7.loc[(ko_abunds_v7 > 0).sum(axis=1) > ko_abunds_v7.shape[1]*.2]\n",
    "ko_abunds_v7 = ko_abunds_v7.loc[ko_abunds_v7.var(axis=1) > 1e-10] # variance filter\n",
    "print(ko_abunds_v7.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "de490f0e-9c64-4836-97cf-873bfc92e743",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LVR_mean</th>\n",
       "      <th>NVR_mean</th>\n",
       "      <th>statistic</th>\n",
       "      <th>p_value</th>\n",
       "      <th>p_adj</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ko</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>K07775</th>\n",
       "      <td>0.000009</td>\n",
       "      <td>0.000011</td>\n",
       "      <td>339.0</td>\n",
       "      <td>0.000582</td>\n",
       "      <td>0.998405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K01179</th>\n",
       "      <td>0.000237</td>\n",
       "      <td>0.000070</td>\n",
       "      <td>358.0</td>\n",
       "      <td>0.000728</td>\n",
       "      <td>0.998405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K06937</th>\n",
       "      <td>0.000007</td>\n",
       "      <td>0.000003</td>\n",
       "      <td>331.0</td>\n",
       "      <td>0.001855</td>\n",
       "      <td>0.998405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K19309</th>\n",
       "      <td>0.000106</td>\n",
       "      <td>0.000035</td>\n",
       "      <td>346.0</td>\n",
       "      <td>0.002150</td>\n",
       "      <td>0.998405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K03205</th>\n",
       "      <td>0.001154</td>\n",
       "      <td>0.000766</td>\n",
       "      <td>331.0</td>\n",
       "      <td>0.006594</td>\n",
       "      <td>0.998405</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        LVR_mean  NVR_mean  statistic   p_value     p_adj\n",
       "ko                                                       \n",
       "K07775  0.000009  0.000011      339.0  0.000582  0.998405\n",
       "K01179  0.000237  0.000070      358.0  0.000728  0.998405\n",
       "K06937  0.000007  0.000003      331.0  0.001855  0.998405\n",
       "K19309  0.000106  0.000035      346.0  0.002150  0.998405\n",
       "K03205  0.001154  0.000766      331.0  0.006594  0.998405"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ko_stats_v7_rows = list()\n",
    "for ko, row in ko_abunds_v7.iterrows():\n",
    "    lvr_abunds = row[meta_v7.query('VR_group == \"LVR\"').index]\n",
    "    nvr_abunds = row[meta_v7.query('VR_group == \"NVR\"').index]\n",
    "    # check for not all zeros\n",
    "    lvr_gt_20 = (lvr_abunds != 0).sum()/len(lvr_abunds) > .2\n",
    "    nvr_gt_20 = (nvr_abunds != 0).sum()/len(nvr_abunds) > .2\n",
    "    # lvr_gt_20 = lvr_abunds.sum()/len(lvr_abunds) > 5\n",
    "    # nvr_gt_20 = nvr_abunds.sum()/len(nvr_abunds) > 5\n",
    "    # print(lvr_gt_20, nvr_gt_20)\n",
    "    if lvr_gt_20 or nvr_gt_20:\n",
    "        stat, p_value = mannwhitneyu(lvr_abunds, nvr_abunds)\n",
    "        ko_stats_v7_rows.append([ko, lvr_abunds.mean(), nvr_abunds.mean(), stat, p_value])\n",
    "ko_stats_v7 = pd.DataFrame(ko_stats_v7_rows, columns=['ko', 'LVR_mean', 'NVR_mean', 'statistic', 'p_value']).sort_values('p_value')\n",
    "ko_stats_v7['p_adj'] = p_adjust(ko_stats_v7['p_value'])\n",
    "ko_stats_v7 = ko_stats_v7.set_index('ko')\n",
    "ko_stats_v7.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "8318e18d-2169-4674-95dc-6fb16507743f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "100\n"
     ]
    }
   ],
   "source": [
    "print(len(ko_stats_v7.query('p_value < .05')))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2f37af16-866f-4bd6-a7aa-8fe1124743c8",
   "metadata": {},
   "source": [
    "Many fewer significant results than at 2 months but we will still look for enrichment."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "6034c751-ffbd-40d3-b1f2-49b161414f20",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>module_size</th>\n",
       "      <th>in_in</th>\n",
       "      <th>in_out</th>\n",
       "      <th>out_in</th>\n",
       "      <th>out_out</th>\n",
       "      <th>odds_ratio</th>\n",
       "      <th>p_value</th>\n",
       "      <th>p_adj</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>module</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>M00580</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>99</td>\n",
       "      <td>4</td>\n",
       "      <td>2190</td>\n",
       "      <td>5.530303</td>\n",
       "      <td>0.199927</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00345</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>99</td>\n",
       "      <td>6</td>\n",
       "      <td>2188</td>\n",
       "      <td>3.683502</td>\n",
       "      <td>0.268320</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00631</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>99</td>\n",
       "      <td>7</td>\n",
       "      <td>2187</td>\n",
       "      <td>3.155844</td>\n",
       "      <td>0.300313</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00868</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>99</td>\n",
       "      <td>7</td>\n",
       "      <td>2187</td>\n",
       "      <td>3.155844</td>\n",
       "      <td>0.300313</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00911</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>99</td>\n",
       "      <td>7</td>\n",
       "      <td>2187</td>\n",
       "      <td>3.155844</td>\n",
       "      <td>0.300313</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        module_size  in_in  in_out  out_in  out_out  odds_ratio   p_value  \\\n",
       "module                                                                      \n",
       "M00580            5      1      99       4     2190    5.530303  0.199927   \n",
       "M00345            7      1      99       6     2188    3.683502  0.268320   \n",
       "M00631            8      1      99       7     2187    3.155844  0.300313   \n",
       "M00868            8      1      99       7     2187    3.155844  0.300313   \n",
       "M00911            8      1      99       7     2187    3.155844  0.300313   \n",
       "\n",
       "        p_adj  \n",
       "module         \n",
       "M00580    1.0  \n",
       "M00345    1.0  \n",
       "M00631    1.0  \n",
       "M00868    1.0  \n",
       "M00911    1.0  "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "v7_sig_kos = set(ko_stats_v7.query('p_value < .05').index)\n",
    "v7_enrichment = measure_enrichment(v7_sig_kos, modules, all_module_kos)\n",
    "v7_enrichment.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "504898c7-3503-4f1f-96ca-ad1c1bb06862",
   "metadata": {},
   "source": [
    "We find nothing though."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d0e97245-ecdb-40dc-848c-0196d057355c",
   "metadata": {},
   "source": [
    "### 1 year"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "104b362e-a645-42eb-8e28-9f60ff7f78f8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(4259, 42)\n"
     ]
    }
   ],
   "source": [
    "ko_abunds_v9 = ko_abunds[meta_v9.index]\n",
    "ko_abunds_v9 = ko_abunds_v9.loc[(ko_abunds_v9 > 0).sum(axis=1) > ko_abunds_v9.shape[1]*.2]\n",
    "ko_abunds_v9 = ko_abunds_v9.loc[ko_abunds_v9.var(axis=1) > 1e-10] # variance filter\n",
    "print(ko_abunds_v9.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "92e84f61-687b-42cd-a924-3242ef442a79",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>LVR_mean</th>\n",
       "      <th>NVR_mean</th>\n",
       "      <th>statistic</th>\n",
       "      <th>p_value</th>\n",
       "      <th>p_adj</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ko</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>K02346</th>\n",
       "      <td>0.000734</td>\n",
       "      <td>0.000534</td>\n",
       "      <td>217.0</td>\n",
       "      <td>0.000635</td>\n",
       "      <td>0.916182</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K02238</th>\n",
       "      <td>0.000946</td>\n",
       "      <td>0.000670</td>\n",
       "      <td>209.0</td>\n",
       "      <td>0.002214</td>\n",
       "      <td>0.916182</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K03301</th>\n",
       "      <td>0.000047</td>\n",
       "      <td>0.000013</td>\n",
       "      <td>194.5</td>\n",
       "      <td>0.004025</td>\n",
       "      <td>0.916182</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K08156</th>\n",
       "      <td>0.000499</td>\n",
       "      <td>0.000304</td>\n",
       "      <td>204.0</td>\n",
       "      <td>0.004359</td>\n",
       "      <td>0.916182</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K05708</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000014</td>\n",
       "      <td>42.0</td>\n",
       "      <td>0.004596</td>\n",
       "      <td>0.916182</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        LVR_mean  NVR_mean  statistic   p_value     p_adj\n",
       "ko                                                       \n",
       "K02346  0.000734  0.000534      217.0  0.000635  0.916182\n",
       "K02238  0.000946  0.000670      209.0  0.002214  0.916182\n",
       "K03301  0.000047  0.000013      194.5  0.004025  0.916182\n",
       "K08156  0.000499  0.000304      204.0  0.004359  0.916182\n",
       "K05708  0.000000  0.000014       42.0  0.004596  0.916182"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ko_stats_v9_rows = list()\n",
    "for ko, row in ko_abunds_v9.iterrows():\n",
    "    lvr_abunds = row[meta_v9.query('VR_group == \"LVR\"').index]\n",
    "    nvr_abunds = row[meta_v9.query('VR_group == \"NVR\"').index]\n",
    "    # check for not all zeros\n",
    "    lvr_gt_20 = (lvr_abunds != 0).sum()/len(lvr_abunds) > .2\n",
    "    nvr_gt_20 = (nvr_abunds != 0).sum()/len(nvr_abunds) > .2\n",
    "    # lvr_gt_20 = lvr_abunds.sum()/len(lvr_abunds) > 5\n",
    "    # nvr_gt_20 = nvr_abunds.sum()/len(nvr_abunds) > 5\n",
    "    # print(lvr_gt_20, nvr_gt_20)\n",
    "    if lvr_gt_20 or nvr_gt_20:\n",
    "        stat, p_value = mannwhitneyu(lvr_abunds, nvr_abunds)\n",
    "        ko_stats_v9_rows.append([ko, lvr_abunds.mean(), nvr_abunds.mean(), stat, p_value])\n",
    "ko_stats_v9 = pd.DataFrame(ko_stats_v9_rows, columns=['ko', 'LVR_mean', 'NVR_mean', 'statistic', 'p_value']).sort_values('p_value')\n",
    "ko_stats_v9['p_adj'] = p_adjust(ko_stats_v9['p_value'])\n",
    "ko_stats_v9 = ko_stats_v9.set_index('ko')\n",
    "ko_stats_v9.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "4ddab8ef-9988-428c-a19f-416b7029f9ed",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "162\n"
     ]
    }
   ],
   "source": [
    "print(len(ko_stats_v9.query('p_value < .05')))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7a39eff0-d20a-4ad2-97a6-b2641c117cad",
   "metadata": {},
   "source": [
    "At one year there is a large number of significant KOs. An alarmingly large number."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "578a9c37-dbc3-40be-a00c-09c13281c857",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>module_size</th>\n",
       "      <th>in_in</th>\n",
       "      <th>in_out</th>\n",
       "      <th>out_in</th>\n",
       "      <th>out_out</th>\n",
       "      <th>odds_ratio</th>\n",
       "      <th>p_value</th>\n",
       "      <th>p_adj</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>module</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>M00023</th>\n",
       "      <td>15</td>\n",
       "      <td>5</td>\n",
       "      <td>157</td>\n",
       "      <td>10</td>\n",
       "      <td>2170</td>\n",
       "      <td>6.910828</td>\n",
       "      <td>0.002532</td>\n",
       "      <td>0.76962</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00532</th>\n",
       "      <td>15</td>\n",
       "      <td>3</td>\n",
       "      <td>159</td>\n",
       "      <td>12</td>\n",
       "      <td>2168</td>\n",
       "      <td>3.408805</td>\n",
       "      <td>0.079945</td>\n",
       "      <td>1.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00545</th>\n",
       "      <td>11</td>\n",
       "      <td>2</td>\n",
       "      <td>160</td>\n",
       "      <td>9</td>\n",
       "      <td>2171</td>\n",
       "      <td>3.015278</td>\n",
       "      <td>0.173653</td>\n",
       "      <td>1.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00899</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>161</td>\n",
       "      <td>4</td>\n",
       "      <td>2176</td>\n",
       "      <td>3.378882</td>\n",
       "      <td>0.301430</td>\n",
       "      <td>1.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M00531</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>161</td>\n",
       "      <td>5</td>\n",
       "      <td>2175</td>\n",
       "      <td>2.701863</td>\n",
       "      <td>0.349854</td>\n",
       "      <td>1.00000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        module_size  in_in  in_out  out_in  out_out  odds_ratio   p_value  \\\n",
       "module                                                                      \n",
       "M00023           15      5     157      10     2170    6.910828  0.002532   \n",
       "M00532           15      3     159      12     2168    3.408805  0.079945   \n",
       "M00545           11      2     160       9     2171    3.015278  0.173653   \n",
       "M00899            5      1     161       4     2176    3.378882  0.301430   \n",
       "M00531            6      1     161       5     2175    2.701863  0.349854   \n",
       "\n",
       "          p_adj  \n",
       "module           \n",
       "M00023  0.76962  \n",
       "M00532  1.00000  \n",
       "M00545  1.00000  \n",
       "M00899  1.00000  \n",
       "M00531  1.00000  "
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "v9_sig_kos = set(ko_stats_v9.query('p_value < .05').index)\n",
    "v9_enrichment = measure_enrichment(v9_sig_kos, modules, all_module_kos)\n",
    "v9_enrichment.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "351ecbb8-4911-4b0a-81ea-6ed84d729841",
   "metadata": {},
   "source": [
    "But after testing for enrichment none is found."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "25c98eb8-1275-449e-8691-62560204f5e3",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
